<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 键值对
// 新增键值对
            var myJson = {
                "name":"laowang",
                "age":18
            };
        // 删除键值对
        delete myJson.age
            
        document.write(myJson.name);
       document.write(myJson["name"]);
        //     for in遍历下标 for of 遍历值
            for(var t in myJson){
                console.log(t);
                console.log(myJson[t]);
            }
        </script>
</body>
</html>